{subtemplate common/header}

<!--{if $_G['forum']['ismoderator']}-->
	<script type="text/javascript" src="{$_G[setting][jspath]}forum_moderate.js?{VERHASH}"></script>
<!--{/if}-->

<div id="pt" class="wp"><a href="index.php" id="fjump"{if $_G['setting']['forumjump'] == 1} onmouseover="showMenu({'ctrlid':this.id})"{/if} class="nvhm">$_G[setting][bbname]</a> $navigation</div>

{ad/text/wp a_t}
<style id="diy_style" type="text/css"></style>
<div class="wp">
	<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>
<div id="ct" class="wp cl{if $simplestyle || $subforumonly} w{/if}">
	<div class="mn{if $simplestyle || $subforumonly} mw{/if}">
		<div class="ch">
			<label class="wx"><a href="$_G[setting][navs][2][filename]">$_G[setting][navs][2][navname]</a></label>
			{hook/forumdisplay_header}
		</div>
		<div id="fh"{if $_G[forum][banner]} class="{if $simplestyle || $subforumonly}mw{else}m bbda{/if} pbm"{/if}>
			<!--{if $_G[forum][banner] && !$simplestyle && !$subforumonly}--><img src="$_G[forum][banner]" width="644" height="150" alt="$_G['forum'][name]" /><!--{/if}-->
			<div class="bm h cl">
				<h1 class="wx"><a href="forum.php?mod=forumdisplay&fid=$_G[fid]">$_G['forum'][name]</a></h1>
				<em class="fct mtn y">
					<a href="home.php?mod=spacecp&ac=favorite&type=forum&id=$_G[fid]&handlekey=favoriteforum" id="a_favorite" onclick="showWindow(this.id, this.href, 'get', 0);" title="{lang favorite}"><img src="{IMGDIR}/icon_fav.png" alt="{lang favorite}" /></a>
					<!--{if $_G[setting][rssstatus] && !$_G['gp_archiveid'] && !$subforumonly}--><a href="forum.php?mod=rss&fid=$_G[fid]&amp;auth=$rssauth" target="_blank" title="RSS"><img src="{IMGDIR}/icon_feed.png" alt="RSS" /></a><!--{/if}-->
					<!--{if !empty($forumarchive)}-->
						<a id="forumarchive" href="javascript:;" onmouseover="showMenu(this.id)"><img src="{IMGDIR}/fach.gif" alt="{if $_G['gp_archiveid']}$forumarchive[$_G['gp_archiveid']]['displayname']{else}{lang forum_archive}{/if}" /></a>
					<!--{/if}-->
				</em>
			</div>
			<div id="forumarchive_menu" class="p_pop" style="display:none">
				<ul class="bbda">
					<li><a href="forum.php?mod=forumdisplay&amp;fid=$_G[fid]">{lang threads_all}</a></li>
					<!--{loop $forumarchive $id $info}-->
					<li><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&archiveid=$id">{$info['displayname']} ({$info['threads']})</a></li>
					<!--{/loop}-->
				</ul>
			</div>
			<!--{if $_G['forum'][description] || $_G['page'] == 1 && ($moderatedby || $_G['forum']['rules']) || !empty($_G[setting][pluginhooks][forumdisplay_forumaction]) || $_G['forum']['ismoderator'] && ($_G['forum']['recyclebin'] || $_G['forum']['modworks'])}-->
				<div class="bm">
					<!--{if $_G['forum'][description]}-->
						<div class="xg2 pbn">
							$_G['forum'][description]
						</div>
					<!--{/if}-->
					<!--{if $_G['page'] == 1}-->
						<!--{if $moderatedby}--><div class="pbn">{lang forum_modedby}: <span class="xi2">$moderatedby</span></div><!--{/if}-->
						<!--{if $_G['forum']['rules']}-->
							<p class="pbn ptn"><a href="javascript:;" onclick="toggle_collapse('forum_rules', 1)" class="xi2"><strong>{lang forum_rules}:</strong></a></p>
							<div id="forum_rules" class="pbn xg2" style="$collapse['forum_rules'];"> $_G['forum'][rules]</div>
						<!--{/if}-->
					<!--{/if}-->

					<!--{if !empty($_G[setting][pluginhooks][forumdisplay_forumaction])}-->
						<div class="pbn">{hook/forumdisplay_forumaction}</div>
					<!--{/if}-->

					<!--{if $_G['forum']['ismoderator']}-->
						<div class="o cl{if $_G['forum']['recyclebin'] || $_G['forum']['modworks']} pbm{/if}">
							<!--{if $_G['forum']['recyclebin']}-->
								<a href="{if $_G['adminid'] == 1}admin.php?mod=forum&action=recyclebin&frames=yes{elseif $_G['forum']['ismoderator']}forum.php?mod=modcp&action=recyclebins&fid=$_G[fid]{/if}" class="recyclebin" target="_blank">{lang forum_recyclebin}</a>
							<!--{/if}-->
							<!--{if $_G['forum']['modworks']}-->
								<!--{if $modnum}--><a href="forum.php?mod=modcp&action=moderate&op=threads&fid=$_G[fid]" target="_blank">{lang mod_works_modpost_existence}</a><!--{/if}-->
								<!--{if $modusernum}--><a href="forum.php?mod=modcp&action=moderate&op=members&fid=$_G[fid]" target="_blank">{lang mod_works_moduser_existence}</a><!--{/if}-->
							<!--{/if}-->
							{hook/forumdisplay_modlink}
						</div>
					<!--{/if}-->
				</div>
			<!--{/if}-->
		</div>

		{hook/forumdisplay_top}

		<!--{if $subexists}-->{template forum/forumdisplay_subforum}<!--{/if}-->

		{hook/forumdisplay_middle}

		<!--{if !$subforumonly}-->
			<div class="pgs pgt bm cl">
				$multipage
				<span class="pgb y" <!--{if $_G[setting][visitedforums]}-->id="visitedforums" onmouseover="$('visitedforums').id = 'visitedforumstmp';this.id = 'visitedforums';showMenu({'ctrlid':this.id})"<!--{/if}--> ><a href="forum.php">{lang return_index}</a></span>
				<!--{if !$_G['gp_archiveid']}--><button id="newspecial" class="pn pnc" prompt="post_newthread" onmouseover="$('newspecial').id = 'newspecialtmp';this.id = 'newspecial';showMenu({'ctrlid':this.id})"{if !$_G['forum']['allowspecialonly']} onclick="showWindow('newthread', 'forum.php?mod=post&action=newthread&fid=$_G[fid]')"{else} onclick="location.href='forum.php?mod=post&action=newthread&fid=$_G[fid]'"{/if}><strong>{lang send_posts}</strong></button><!--{/if}-->
				<!--{if $_G['forum']['ismoderator'] && !$_G['gp_archiveid']}-->
					<!--{if $_G['forum']['status'] != 3}-->
						<button type="button" class="pn" onclick="window.location.href='forum.php?mod=modcp&fid=$_G[fid]'"><em>{lang modcp}</em></button>
					<!--{else}-->
						<button type="button" class="pn" onclick="window.location.href='forum.php?mod=group&action=manage&fid=$_G[fid]'"><em>{lang modcp}</em></button>
					<!--{/if}-->
				<!--{/if}-->
			</div>

			{subtemplate forum/forumdisplay_list}
		<!--{/if}-->

		{hook/forumdisplay_bottom}

</div>

<!--{if !$simplestyle && !$subforumonly}-->
	<div class="sd pph">
		{subtemplate common/userabout}
		<!-- change by dfox  -->
		<div class="tns">
			<table cellpadding="4" cellspacing="0" border="0">
				<tr>
					<th><p>$_G[forum][todayposts]</p>{lang index_today}</th>
					<th><p>$_G[forum][threads]</p>{lang index_threads}</th>
					<td><p>$onlinenum</p>{lang num_of_spectators}</td>
				</tr>
			</table>
		</div>
		<!--{if !empty($_G['forum']['recommendlist'])}-->
			<hr class="l" />
			<div class="bn">
				<h2>{lang forum_recommend}</h2>
				{subtemplate forum/recommend}
			</div>
		<!--{/if}-->
		<hr class="l" />
		<div class="bn">
			<h2>{lang their}: $_G['cache']['forums'][$_G['forum']['fup']]['name']</h2>
			<ul class="xl xl2 cl">
			<!--{loop $_G['cache']['forums'] $bforum}-->
				<!--{if $bforum['fup'] == $_G['forum']['fup'] && $bforum['status']}-->
					<li><a href="forum.php?mod=forumdisplay&fid=$bforum[fid]">$bforum['name']</a></li>
				<!--{/if}-->
			<!--{/loop}-->
			</ul>
		</div>
		<hr class="l" />
		<!--{if $recommendgroups}-->
		<div class="bn">
			<h2>{lang recommended_groups}</h2>
			<ul class="ml mls cl">
			<!--{loop $recommendgroups $key $group}-->
				<li>
				<a href="forum.php?mod=group&fid=$group[fid]" title="$group[name]" target="_blank" class="avt"><img src="$group[icon]" alt="$group[name]"></a>
				<p><a href="forum.php?mod=group&fid=$group[fid]" target="_blank">$group[name]</a></p>
				</li>
			<!--{/loop}-->
			</ul>
		</div>
		<hr class="l" />
		<!--{/if}-->
		<div class="drag">
			<!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
		</div>
		<!--{if !($_G['forum']['simple'] & 1) && $_G[setting][whosonlinestatus]}-->
			<div class="bn">
				<!--{if $detailstatus}-->
					<span class="o y"><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&amp;page=$page&amp;showoldetails=no#online"><img src="{IMGDIR}/collapsed_no.gif" alt="" /></a></span>
				<h2>{lang forum_activeusers} ($onlinenum)</h2>
				<ul class="ml mls cl">
				<!--{loop $whosonline $key $online}-->
					<li>
					<a href="home.php?mod=space&amp;do=home&amp;uid=$online[uid]" class="avt"><!--{avatar($online[uid],small)}--></a>
					<!--{if $online['uid']}-->
						<p><a href="home.php?mod=space&amp;do=home&amp;uid=$online[uid]">$online[username]</a></p>
					<!--{else}-->
						<p>$online[username]</p>
					<!--{/if}-->
					<span>$online[lastactivity]{LF}</span>
					</li>
				<!--{/loop}-->
				</ul>
				<!--{else}-->
					<span class="o y"><a href="forum.php?mod=forumdisplay&fid=$_G[fid]&amp;page=$page&amp;showoldetails=yes#online" class="nobdr"><img src="{IMGDIR}/collapsed_yes.gif" alt="" /></a></span>
					<h2>{lang forum_activeusers}</h2>
				<!--{/if}-->
			</div>
			<hr class="da" />
		<!--{/if}-->

		{hook/forumdisplay_side_bottom}
	</div>
<!--{/if}-->

<!--{if $_G['group']['allowpost'] && ($_G['group']['allowposttrade'] || $_G['group']['allowpostpoll'] || $_G['group']['allowpostreward'] || $_G['group']['allowpostactivity'] || $_G['group']['allowpostdebate'] || $_G['setting']['threadplugins'] || $_G['forum']['threadsorts'])}-->
	<ul class="p_pop" id="newspecial_menu" style="display: none">
		<!--{if !$_G['forum']['allowspecialonly']}--><li><a href="forum.php?mod=post&action=newthread&fid=$_G[fid]">{lang post_newthread}</a></li><!--{/if}-->
		<!--{if $_G['group']['allowpostpoll']}--><li class="poll"><a href="forum.php?mod=post&action=newthread&fid=$_G[fid]&special=1">{lang post_newthreadpoll}</a></li><!--{/if}-->
		<!--{if $_G['group']['allowpostreward']}--><li class="reward"><a href="forum.php?mod=post&action=newthread&fid=$_G[fid]&special=3">{lang post_newthreadreward}</a></li><!--{/if}-->
		<!--{if $_G['group']['allowpostdebate']}--><li class="debate"><a href="forum.php?mod=post&action=newthread&fid=$_G[fid]&special=5">{lang post_newthreaddebate}</a></li><!--{/if}-->
		<!--{if $_G['group']['allowpostactivity']}--><li class="activity"><a href="forum.php?mod=post&action=newthread&fid=$_G[fid]&special=4">{lang post_newthreadactivity}</a></li><!--{/if}-->
		<!--{if $_G['group']['allowposttrade']}--><li class="trade"><a href="forum.php?mod=post&action=newthread&fid=$_G[fid]&special=2">{lang post_newthreadtrade}</a></li><!--{/if}-->
		<!--{if $_G['setting']['threadplugins']}-->
			<!--{loop $_G['forum']['threadplugin'] $tpid}-->
				<!--{if array_key_exists($tpid, $_G['setting']['threadplugins']) && @in_array($tpid, $_G['group']['allowthreadplugin'])}-->
					<li class="popupmenu_option"{if $_G['setting']['threadplugins'][$tpid][icon]} style="background-image:url($_G[setting][threadplugins][$tpid][icon])"{/if}><a href="forum.php?mod=post&action=newthread&fid=$_G[fid]&specialextra=$tpid">{$_G[setting][threadplugins][$tpid][name]}</a></li>
				<!--{/if}-->
			<!--{/loop}-->
		<!--{/if}-->
		<!--{if $_G['forum']['threadsorts'] && !$_G['forum']['allowspecialonly']}-->
			<!--{loop $_G['forum']['threadsorts']['types'] $id $threadsorts}-->
				<!--{if $_G['forum']['threadsorts']['show'][$id]}-->
					<li class="popupmenu_option"><a href="forum.php?mod=post&action=newthread&amp;fid=$_G[fid]&amp;extra=$extra&amp;sortid=$id">$threadsorts</a></li>
				<!--{/if}-->
			<!--{/loop}-->
		<!--{/if}-->
	</ul>
<!--{/if}-->

<!--{if $_G['setting']['visitedforums']}-->
	<ul class="p_pop" id="visitedforums_menu" style="display: none;">
		$_G[setting][visitedforums]
	</ul>
<!--{/if}-->

<!--{if $_G['setting']['forumjump']}-->
	<div class="p_pop" id="fjump_menu" style="display: none">
	$forummenu
	</div>
<!--{/if}-->

<!--{if $_G['setting']['threadmaxpages'] > 1}-->
	<script type="text/javascript">document.onkeyup = function(e){keyPageScroll(e, {if $page > 1}1{else}0{/if}, {if $page < $_G['setting']['threadmaxpages'] && $page < $_G['page_next']}1{else}0{/if}, 'forum.php?mod=forumdisplay&fid={$_G[fid]}&filter={$_G[gp_filter]}&orderby={$_G[gp_orderby]}{$forumdisplayadd[page]}&{$multipage_archive}', $page);}</script>
<!--{/if}-->
</div>

<div class="wp mtn">
	<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>
{subtemplate common/footer}
